import {
    BROWSING_HISTORY_LIST,
    DELETE_HISTORY,
    CLEAR_HISTORY,
} from '@/config/url';
import request from '@/utils/request';

// 浏览列表
export const getBrowsingList = (data) => {
    return request(BROWSING_HISTORY_LIST, {data});
};

// 删除浏览历史
export const deleteBrowsing = (data) => {
    let url = DELETE_HISTORY.replace(/\{id\}/, data)
    return request(url, {method: 'delete'});
};
// 清空浏览历史
export const clearBrowsing = (data) => {
    return request(CLEAR_HISTORY, {method: 'delete'});
};